﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Pathfinding;
using Services.AI;
using Controller.ServiceContract;

namespace Controller
{
    public class PrNPCController
    {
        private IServicesNPC NPCService;

        //private ServicesNPC NPCService;
        //IUnityContainer unityContainer = new UnityContainer();
        /// <summary>
        /// Constructor of the class
        /// </summary>
        public PrNPCController()
        {
            NPCService = new ServicesNPC();
        }

        /// <summary>
        /// Set the list of places for the IA
        /// </summary>
        /// <param name="lp">List of places</param>
        public void SetListPlaces(ListPlaces lp)
        {
            NPCService.SetListPlaces(lp);
        }

        /// <summary>
        /// Set the initial path to the NPC take.
        /// </summary>
        /// <param name="NPC">CLass citizen Model associate to the object</param>
        public void StartPath(CitizenModel NPC)
        {
            NPCService.StartPath(NPC);
        }

        /// <summary>
        /// Make the NPC moves in random direction
        /// </summary>
        /// <param name="NPC">CLass citizen Model associate to the object</param>
        public void MoveNPC(CitizenModel NPC)
        {
            NPCService.MoveNPC(NPC);
        }
    }
}